home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 001-100 / 001-025 / 009 / proff / proffman.prf < prev    next >
Text File  |  1995-03-17  |  46KB  |  1,567 lines

  1.  
  2. .! Proff user's manual
  3. .! Feb. 1984 by Ozan S. Yigit
  4. .!
  5. .! Edited by Steven Tress and Terry Lim
  6. .! vers. 1.0
  7. .!
  8. .! ----------- macros ----------
  9. .! sect - produce a bold section header and
  10. .! enter a contents line. First parameter
  11. .! is indent level for contents line.
  12. .define sect
  13. .sp
  14. .cl $1 $2 $3 $4 $5 $6 $7
  15. .bd
  16. $2 $3 $4 $5 $6 $7
  17. .en
  18. .! -----------------------------
  19. .define note
  20. .sp
  21. .ce
  22. NOTE
  23. .sp
  24. .fi
  25. .in +5
  26. .rm -5
  27. .en
  28. .define endnote
  29. .sp
  30. .nf
  31. .in -5
  32. .rm +5
  33. .en
  34. .! -----------------------------
  35. .! Macros to create a point-form lists. 
  36. .! Note the use of number registers within
  37. .! the macros. See section 5.
  38. .!              
  39. .define list
  40. .nr a $1
  41. .in +$1
  42. .en
  43.  
  44. .define item
  45. .sp
  46. .ti -@na
  47. $1
  48. .en
  49.  
  50. .define nolist
  51. .in -@na
  52. .sp
  53. .en
  54. .! -----------------------------
  55. .ce 100
  56. .st 8
  57. PROFF User's Guide
  58. .sp
  59. Version 1.0
  60. .ce 0
  61. .nf
  62. .in +25
  63. .sp 15
  64. ***  *******
  65. ***  *********
  66.      **         **
  67.      **         **
  68.      *********
  69.      *******
  70.      **
  71.      **
  72.      **
  73. ******
  74. ****
  75. .in -25
  76. .fi
  77. .ce 100
  78. .st -8
  79. Ozan S. Yigit & Steven Tress
  80. March 1984
  81. .ce 0
  82. .bp 1
  83. .he /1.0/Proff User's Guide/#/
  84. .ap
  85. .fi
  86. .ju
  87. .sect 0 1.0 Introduction
  88.  This manual describes PROFF, a formatter based on the FORMAT utility
  89. presented in
  90. .ul
  91. Software Tools.
  92.  PROFF was produced to provide a powerful formatter that can be used under
  93. a variety of microcomputers, thus providing a consistent formatting tool
  94. across environments. PROFF can be used to format memos, reports, form letters 
  95. and
  96. documents such as this manual. It can also be configured to mimic 
  97. other formatting
  98. systems of similar nature.
  99.  This document itself was produced with PROFF, using most of its advanced features.
  100. PROFF took care of such things as auto-paragraphing and the production of 
  101. the Table of Contents as the manual was being formatted.
  102.  PROFF was developed under a Digital Equipment Corporation Rainbow 100,
  103. using Mark Williams C Compiler for portability reasons. PROFF is
  104. available under VAX/VMS operating system. PROFF implementations for 
  105. IBM PC and APPLE ][ microcomputers are also underway.
  106. .st -14
  107. Rainbow, VAX/VMS are trademarks of Digital Equipment Corporation.
  108. .br
  109. Mark Williams C Compiler is a trademark of Mark Williams Company.
  110. .br
  111. IBM is a registered trademark of International Business Machines Inc.
  112. .br
  113. APPLE is a trademark of Apple Computer Inc.
  114. .br
  115. UNIX is a trademark of Bell Laboratories.
  116. .bp
  117. .cl
  118. .sect 0 2.0 General Description
  119. .cl
  120. .sect 1 2.1 The Input
  121.  The text that is to be formatted by PROFF is typed into an input file
  122. using any text editor. This file contains the text to be formatted
  123. as well as PROFF commands.
  124.  Each line in the input file is either a command line or a text line. A
  125. command line is a line that begins with a period ("."). All other lines are
  126. text lines. The command lines are not printed - they tell PROFF how you want
  127. it to format the text that follows. Appendix A summarizes all of the PROFF
  128. commands for a quick reference.
  129. .sect 2 2.1.1 Text
  130.  Text can be entered into the input file in any format. PROFF removes all extra
  131. blanks and tabs between words when operating in fill mode. This means you do
  132. not have to worry about how many words you put on a line, and you can break 
  133. lines wherever it is convenient to your typing. Note however, that you cannot
  134. break a word between two lines.
  135.  Blanks and tabs at the beginning of a line are not removed. This is useful
  136. for producing special tables and performing special types of indentation.
  137. Thus, normal text lines should not have any leading tabs or blanks.
  138. .sect 2 2.1.2 Commands
  139.  A command is a line that starts with a period. Immediately following the
  140. period is a command name. Some commands accept a numeric quantity or a
  141. character string parameter, which must be separated from the command name
  142. by a space or a comma. For example, an indent command might appear as follows:
  143. .save
  144. .in +5
  145. .nf
  146. .nj
  147. .sp
  148. |
  149. |It is to do nothing that the elect exists.
  150. |.in 5
  151. |- Oscar Wilde
  152. |
  153. .restore
  154.  Assuming that the left margin was at column 1, PROFF would produce the
  155. following:
  156. .save
  157. .in +5
  158. .nf
  159. .nj
  160. .sp
  161. .need 4
  162. |
  163. |It is to do nothing that the elect exists.
  164. |     - Oscar Wilde
  165. |
  166. .restore
  167. .sp
  168. (In the examples above, as in those following, the vertical line indicates
  169. the left edge of input or the left edge of the printed page).
  170.  The number following the command may be preceeded by a "+" or "-" sign.
  171. This plus or minus sign indicates an addition or subtraction of the number
  172. to or from the current value for the command. for example, the text:
  173. .sp
  174. .save
  175. .in +5
  176. .nf
  177. .nj
  178. .need 11
  179. |
  180. |Nothing to do but work,
  181. |.in +3
  182. |Nothing to eat but food,
  183. |.in -3
  184. |Nothing to wear but clothes
  185. |.in +3
  186. |To keep one from going nude.
  187. |.in +7
  188. |-Benjamin King
  189. |
  190. .in -5
  191. .sp
  192. will produce as output:
  193. .sp
  194. .in +5
  195. .need 6
  196. |
  197. |Nothing to do but work,
  198. |   Nothing to eat but food,
  199. |Nothing to wear but clothes
  200. |   To keep one from going nude.
  201. |          -Benjamin King
  202. |
  203. .restore
  204.  If a number is not supplied with a command that requires a number, PROFF
  205. will use a default value. The defaults for each command are summarized in
  206. Appendix A.
  207. .cl
  208. .sect 1 2.2 The Output
  209.  The main functions performed by PROFF are 
  210. .ul
  211. filling
  212. and 
  213. .ul
  214. justifying.
  215. A line is
  216. filled by packing as many words onto it as will fit. The line is justified
  217. by spacing words evenly between the left and right margins. When PROFF starts,
  218. it assumes that the text is to be filled and justified. Of course, when fill
  219. and justify are not needed (as in the case of a letter or a table), there are
  220. commands to turn these features off, and back on again, as necessary.
  221.  When PROFF is in fill mode, it normally strips out extra spaces and tabs 
  222. between words.
  223.  Many PROFF commands cause a
  224. .ul
  225. break
  226. to occur in the output. This means that the line currently being filled is 
  227. immediately output. Any following text goes into a new output line.
  228. .cl
  229. .sect 1 2.3 Executing PROFF
  230.  Once a text file is ready for formatting, PROFF is started by typing
  231. the program name, various options, name of the input file and the name
  232. of the output file. For example the command
  233. .sp
  234. .in +5
  235. A> proff  -po5 proffman.prf proff.man
  236. .sp
  237. .in -5
  238. would produce this document as proff.man, from an input file proffman.prf, 
  239. shifted right by 5 spaces.
  240. (The symbol "A>" is CP/M system prompt).
  241. .cl
  242. .sect 1 2.4 Bibliographic Notes
  243.   PROFF wa produced by re-writing the Software Tools Formatter FORMAT.
  244. Some of the ideas are from Freshwater Institute RUNOFF, NROFF, 
  245. University of Waterloo SCRIPT
  246. and other formatters of similar nature. The underlying ideas of the
  247. mentioned above formatters may be found in
  248. .ul
  249. Software Tools
  250. by B.W. Kernighan and P.J. Plauger. 1976. (Addison-Wesley, Reading, Mass.).
  251. .cl
  252. .sect 1 2.5 References and Readings
  253. .nf
  254. .nap
  255. .sp
  256. Brian W. Kernighan and P. J. Plauger,
  257. .ul
  258. Software Tools
  259. Addison-Wesley (1976)
  260. .sp
  261. R. Furuta, J. Scofield and A. Shaw,
  262. .ul
  263. Document Formatting Systems:
  264. .ul
  265. Survey, Concepts, and issues
  266. ACM Computing Surveys, Sept. 1982, Pp. 417
  267. .sp
  268. Mark Stuart Brader,
  269. .ul
  270. An Incremental Text Formatter
  271. Department of Computer Science
  272. University of Waterloo, CS-81-12
  273. .bp
  274. .fi
  275. .ap
  276. .cl
  277. .sect 0 3.0 Command Descriptions
  278.  This section describes PROFF commands. Commands specify how the program is
  279. to process the text lines in the input file. Lines in the input file that
  280. begin with a period (or the control character selected by the user) 
  281. immediately followed by a command name are commands. Any line that begins
  282. with a period and followed by a _# or _! is a comment line and is ignored
  283. by PROFF - this allows you to put information in the file that will be neither
  284. processed nor output by PROFF.
  285.  As described earlier, some of the commands can be followed by "parameters".
  286. Parameters are used in executing a command; for example, in the command
  287. ".sp 3", the parameter "3" tells the formatter to insert 3 blank lines into
  288. the document. The following conventions are used in describing the parameters:
  289. .sp
  290. .in +5
  291. .ti -2
  292. o Parameters surrounded by square brackets are optional. If not supplied, PROFF
  293. assumes a default value. 
  294. .br
  295. (e.g. .sp [n])
  296. .sp
  297. .ti -2
  298. o Parameters surrounded by angle brackets are mandatory. PROFF will display
  299. a fatal error message if the parameter is absent. (e.g. .set <variable name>)
  300. .sp
  301. .ti -2
  302. o Parameters surrounded by squiggly brackets are to be typed exactly as
  303. indicated. (e.g. .pn {roman})
  304. .sp
  305. .ti -2
  306. o A bar character seperating the parameters within brackets indicate an
  307. alternative. (e.g. .st [+|-][n] means both .st [+n] and .st [-n])
  308. .in -5
  309.  In describing the commands, the command is typed exacty as accepted by PROFF
  310. with the associated control character default ("."). If more than one form of
  311. the command is accepted by PROFF, the command names are separated with a
  312. bar indicating an alternative.
  313. .bp
  314. .cl
  315. .sect 1 3.1 Filling and Justifying
  316. .nap
  317. .in +5
  318. .!
  319. .! define a simple macro for generating the headers.
  320. .! note that the second "$" within macro is for 
  321. .! variable expansion. Initially, the variable name
  322. .! is passed into the macro WITHOUT any expension.
  323. .! we also use the new control character within macro.
  324. .!
  325. .define comm
  326. \sp
  327. \cl 2 $$1
  328. \ti -5
  329. $$1
  330. \sp
  331. .en
  332. .! change the control character from period (".") to a backslash ("\")
  333. .! to avoid the interpretation of the command headers
  334. .!
  335. .cchar \
  336. \!
  337. \! Variable creation
  338. \! We use variables to avoid re-typing of multiple options over
  339. \! and over again. These variable names will be reused in the
  340. \! appendix to produce a quick referance
  341. \!
  342. \set FILL ".fi | .f | .fill"
  343. \comm FILL
  344. The fill command causes a line to be filled with as many words as the right
  345. margin allows. For this purpose, all extra blanks and tabs are removed between
  346. words. Each word is separated with a single blank. PROFF automatically assumes
  347. fill mode during the startup.
  348. \set NOFILL ".nf | .nofill"
  349. \comm NOFILL
  350. No fill discontinues the filling of the text. PROFF simply copies the text
  351. to the output. This command may be used to pass tables and other text
  352. unaltered through the formatter.
  353. \set JUST ".ju | .j | .justify"
  354. \comm JUST
  355. Justify causes the words on a line to be evenly spaced between the left and
  356. the right margins. Note that lines can be justified only if lines are also
  357. being filled. PROFF automatically assumes justify mode during the startup.
  358. \set NOJUST ".nj | .nojustify"
  359. \comm NOJUST
  360. No justify discontinues the text justification.
  361. \in -5
  362. \cchar .
  363. .bp
  364. .cl
  365. .sect 1 3.2 Text Formatting
  366. .in +5
  367. .cchar \
  368. \set BREAK ".br | .break"
  369. \comm BREAK
  370. Break causes a break: the current line is printed without justification,
  371. and the next word is placed at the beginning of a new line. Note that many
  372. PROFF commands cause an implicit break.
  373. \set INDENT ".in | .lm | .leftmargin [+|-][n]"
  374. \comm INDENT
  375. Indent causes a break and indents the following lines [n] spaces to the
  376. right of the left margin. [n] can be negative to allow beginning a line
  377. to the left of the left margin, however, a line cannot begin to the left of
  378. column 0. If a plus or minus sign is used with n, then [n] is added or
  379. subtracted to or from the current value.
  380. \set TINDENT ".ti | .i | .left [+|-][n]"
  381. \comm TINDENT
  382. Temporary indent is identical to the indent command except that it 
  383. applies only to the next line of printed text. Thus, the command
  384. ".ti +5" would cause the next line to be printed 5 spaces to the right
  385. of those that follow.
  386. \set SPACETO ".st | .spaceto [-][n]"
  387. \comm SPACETO
  388. Spaceto allows spacing to line [n] from the top of the current page.
  389. If a negative [n] is specified, than spacing is performed to line [n]
  390. from the bottom of the page (excluding the footer lines). Thus, footnotes
  391. can be set at a fixed distance from the bottom of the page by a command such
  392. as ".st -5".
  393. \set SPACE ".sp | .s | .skip [n]"
  394. \comm SPACE
  395. Space causes a break and skips [n] lines, except at the top of 
  396. a page. The space command
  397. is dependent on the setting of line spacing.
  398. \set CENTER ".ce | .center [n | on | off]"
  399. \comm CENTER
  400. Center causes the next [n] lines of text to be centered between the left
  401. and right margins. Centering may be started with "on" and terminated with
  402. "off", in which case all input lines between these commands will be centered.
  403. \set UNDLINE ".ul | .underline [n | on | off]"
  404. \comm UNDLINE
  405. Underline command causes the text on the next [n] input lines to be underlined
  406. when printed. If [n] is omitted, only the next line is underlined. This command
  407. does not cause a break, so words in filled text may be underlined by:
  408. \sp
  409. \save
  410. \cchar .
  411. .in +5
  412. .nf
  413. .need 11
  414. .sp
  415. |
  416. |The "Pay-off" Theory: Only
  417. |.ul
  418. |losers
  419. |believe in luck, horses, horoscopes
  420. |and
  421. |.ul
  422. |lotteries.
  423. |
  424. .in -5
  425. .sp
  426. to get
  427. .in +5
  428. .sp
  429. .fi
  430. |
  431. .br
  432. |The "Pay-off" Theory: Only
  433. .ul
  434. losers
  435. believe in
  436. .br
  437. |luck, horses, horoscopes and
  438. .ul
  439. lotteries.
  440. .br
  441. |
  442. .sp
  443. .restore
  444. Underlining may be started with "on" and terminated with "off", similar to
  445. the centering command.
  446. \set CUNDLINE ".ul | .underline [all | words]"
  447. \comm CUNDLINE
  448. This version of the underline command is used to set the mode of
  449. underlining:
  450. \sp
  451. \nap
  452. \in +5
  453. \nf
  454. all   - underline across all characters,
  455.         including spaces.
  456. \br
  457. words - underline words only
  458. \fi
  459. \sp
  460. \in -5
  461. \ap
  462. \set BOLD ".bd | .bold [n | on | off]"
  463. \comm BOLD
  464. The bold command causes the text on the next [n] input lines to be highlighted
  465. by overstriking. If [n] is omitted, only the next line is highlighted.
  466. Bolding may be started with "on" and terminated with "off" as in the
  467. case of the center and underline commands.
  468. \set DBO ".db | .dbo | .disablebolding"
  469. \comm DBO
  470. Turns the bolding off, all bolding commands are ignored. This feature is
  471. useful for rough drafts.
  472. \set EBO ".eb | .ebo | .enablebolding"
  473. \comm EBO
  474. Turns the bolding feature back on. Bolding is turned on during the PROFF
  475. startup.
  476. \in -5
  477. \cchar .
  478. .bp
  479. .cl
  480. .sect 1 3.3 Page Formatting
  481. .in +5
  482. .cchar \
  483. \set LS ".ls | .spc | .spacing [n]"
  484. \comm LS
  485. Line spacing is the command to set line spacing. Set n to 1 for single spacing,
  486. 2 for double spacing etc. 
  487. \set BP ".bp | .pg | .page [n]"
  488. \comm BP
  489. The begin page command causes a break, ends the current page, outputs
  490. footers if required and begins a new page. If [n] is present, the page number
  491. is set to [n]. The default action is to number the pages incrementally.
  492. \set PN ".pn | .pagenumber {roman} | {arabic}"
  493. \comm PN
  494. Page number command defines the format of the page number. Uppercase roman
  495. numerals may be obtained with "roman" keyword. To convert the page numbers
  496. back to normal, "arabic" is specified. PROFF uses arabic numerals as
  497. a default.
  498. \set NPA ".np | .nopaging"
  499. \comm NPA
  500. No paging disables the pagination. When PROFF is in no paging mode,
  501. "begin page" (.bp) and "page length" (.pl) commands are ignored. This mode
  502. of operation is especially useful for using the proff output with the
  503. multi-column formatter (MC).
  504. \set PA ".pa | .paging"
  505. \comm PA
  506. Paging enables normal page generation. This command starts a 
  507. new page and restores the page length to the
  508. value previous to the ".np" command.
  509. \set NE ".ne | .need | .tp | .testpage [n]"
  510. \comm NE
  511. Test page checks to see whether at least [n] lines remain in the
  512. current page. If less than this number of lines remain, printing will resume
  513. at the top of a new page. If [n] is missing, it is assumed to be zero.
  514. \set HE ".he | .header <text>"
  515. \comm HE
  516. Header sets the text to be printed on top of each page. <text> is 
  517. divided into sections which are to be left justified, centered and right
  518. justified. To divide <text> into these three parts, the first character is
  519. assumed to be a separator. (e.g. /left/center/right/) But any non-alphanumeric
  520. character may also be used. The characters "#" and "%" are replaced with the
  521. current page number and day/time in the header. 
  522. \set FO ".fo | .footer <text>"
  523. \comm FO
  524. Footer is identical to header except that it sets the text to be printed
  525. at the bottom of each page.
  526. \set OHE ".oh <text>"
  527. \comm OHE
  528. The odd header command sets the header for odd pages only.
  529. \set EHE ".eh <text>"
  530. \comm EHE
  531. The even header command sets the header for even pages only.
  532. \set OFO ".of <text>"
  533. \comm OFO
  534. The odd footer command sets the footer for odd pages only.
  535. \set EFO ".ef <text>"
  536. \comm EFO
  537. The even footer command sets the footer for even pages only.
  538. \in -5
  539. \cchar .
  540. .bp
  541. .cl
  542. .sect 1 3.4 Page Layout
  543. .ap
  544.  These commands are used to specify where on the page you want the formatted
  545. text to be placed. The general layout of a page is as follows:
  546. .nap
  547. .need 30
  548. .nf
  549.  
  550.     page offset (.po)                |
  551.     |                        |
  552.     V                        |
  553.     +----+-------------------------------------+----+ -+
  554.     |    |    top margin (m1) includes header       |    |  |
  555.     +----+-------------------------------------+----+  |
  556.     |    |        top margin 2 (m2)       |    |  |
  557.     +----+-------------------------------------+----+  |
  558.     |    |            .           |    |  P
  559.     |    |<-- indent (.in)    .           |    |  A
  560.     |    |            .           |    |  G
  561.     |    |                T           |    |  E
  562.     |    |                 E           |    |
  563.     |    |                   X                 |    |  L
  564.     |    |                 T           |    |  E
  565.     |    |            .           |    |  N
  566.     |    |             right margin (.rm) -->|    |  G
  567.     |    |            .           |    |  T
  568.     |    |            .           |    |  H
  569.     |    |            .           |    |  |
  570.     +----+-------------------------------------+----+  |
  571.     |    |            bottom margin 3 (m3)          |    |  |
  572.     +----+-------------------------------------+----+  |
  573.     |    |    bottom margin (m4) includes footer |    |  |
  574.     +----+-------------------------------------+----+ -+
  575.     |                        |
  576.     |                        |
  577. .fi
  578. .in +5
  579. .cchar \
  580. \set PO ".po | .offset [+|-][n]"
  581. \comm PO
  582. The page offset command moves the entire page to the right or left depending on the
  583. specified value. All indentation is according to the page offset. PROFF
  584. assumes a page offset of 0 during the startup. If [n] is specified with a
  585. plus or minus, it will be added or subtracted from the current value.
  586. \set RM ".rm | .rightmargin [+|-][n]"
  587. \comm RM 
  588. Right Margin sets the position of the last printable character from the
  589. left edge of the page to [n]. Default value for right margin is 65.
  590. A plus or minus value will be added or subtracted from the current value.
  591. If [n] is not specified, right margin is set to the default value.
  592. \set PL ".pl | .ps | .pagesize [n]"
  593. \comm PL
  594. Page length is used to set the number of lines that are to be printed
  595. on a page including the header and footer lines. After [n] lines are printed,
  596. the paper will advance to the top of next page. The default page length is
  597. 66 lines (11 inches for 6 lines/inch). This command is disabled if nopaging
  598. is set.
  599. \set M1 ".m1 [n]"
  600. \comm M1
  601. Margin 1 sets the number of lines (including the header) which will be left at
  602. the top of the page to [n]. The default setting is 3. If [n] is omitted, is
  603. set to the default.
  604. \set M2 ".m2 [n]"
  605. \comm M2
  606. Margin 2 sets the number of blank lines between the header and the first
  607. line of text. The default setting is 2.
  608. \set M3 ".m3 [n]"
  609. \comm M3
  610. Margin 3 sets the number of blank lines between the footer and the last line
  611. of text. The default setting is 2.
  612. \set M4 ".m4 [n]"
  613. \comm M4
  614. Margin 4 sets the number of lines (including the footer) which will be left at
  615. the bottom of the page to [n]. The default setting is 3.
  616. \in -5
  617. \cchar .
  618. .bp
  619. .cl
  620. .ap
  621. .sect 1 3.5 Table of Contents
  622.  This section describes the the commands that are used to generate a table of
  623. contents. Basically, a contents line command is used in every place in
  624. the document where an entry is needed in the table of contents. PROFF
  625. stores the text and the page number when it encounters this command.
  626. After the the body of the document is processed, a print contents command
  627. dumps the contents table. The contents should be dumped in a new page, with
  628. nofill. Page numbering should be disabled if the table of contents is to be
  629. used in front of the document.
  630. .sp
  631. .in +5
  632. .ap
  633. .cchar \
  634. \set CL ".cl | .contline [<n> <text>]"
  635. \comm CL
  636. Contents line specifies a line of <text> to be entered into the table of
  637. contents. <n> specifies the level at which the item is to be printed
  638. in the table. When the table is printed, each level of entry will be
  639. indented by specific number of spaces. 
  640. <text> appears in the output exactly as it appears
  641. in the contents line command, except that leading blanks are removed.
  642. If no options specified in the contents line, a blank is inserted during
  643. the table output.
  644. \set PC ".pc | .printcont [n]"
  645. \comm PC
  646. Print Contents causes the currently accumulated table of contents to be
  647. printed. If [n] is specified, it is used as the indent value for each
  648. level.  If [n] is not specified, it is defaulted to 3.
  649.  A contents line at level 0 is as wide as rightmargin-indent. The
  650. outlook of the table of contents may be changed by altering the right
  651. margin and indent values. A typical table of contents may be produced as
  652. follows:
  653. \in +5
  654. \nf
  655. \sp
  656. |.page
  657. |.he ////
  658. |.fo ////
  659. |.nofill
  660. |.sp
  661. |.center
  662. |Table of Contents
  663. |.sp
  664. |.printcont
  665. \in -5
  666. \fi
  667. \sp
  668. The following example illustrates the generation of a table of contents. Note
  669. that only one table of contents is active for a PROFF session.
  670. \need 40
  671. \sp
  672. \in +5
  673. \nf
  674. \nap
  675. .cl
  676. .cl 0 A. Introduction
  677. Introduction
  678.     text
  679.     .
  680. .cl
  681. .cl 0 B. Methods
  682. Methods
  683.     text
  684.     .
  685. .cl 1 a) Sampling Procedures
  686. Sampling
  687.     text
  688.     .
  689. .cl 1 b) Laboratory Procedures
  690. Laboratory
  691.     text
  692.     .
  693. .cl
  694. .cl 0 C. Results
  695. Results
  696.     text
  697.     .
  698.     .
  699. .pg
  700. .nf
  701. .he ////
  702. .fo ////
  703. .ce
  704. Table of Contents
  705. .sp
  706. .pc
  707. \sp
  708. \in -5
  709. These commands will produce the following table:
  710. \sp
  711. \in +5
  712.         Table of Contents
  713.  
  714. A. Introduction...............................   1
  715.  
  716. B. Methods....................................   3
  717.    a) Sampling Procedures.....................   3
  718.    b) Laboratory Procedures...................   4
  719.  
  720. C. Results....................................   5
  721. \sp
  722. \in -5
  723. \fi
  724. Macros may be defined as described in the following sections to help the generation
  725. of the table of contents.
  726. \cchar .
  727. .in -5
  728. .bp
  729. .cl
  730. .ap
  731. .sect 1 3.6 Miscellaneous
  732.  This section describes miscellaneous commands that radically increase the
  733. formatting powers of PROFF. With the assistance of variables, PROFF can 
  734. generate form letters and documents with dynamic parts. The ability to save
  735. and restore formatter context eliminates the need to remember the exact
  736. settings of the formatter across the document.
  737. .in +5
  738. .cchar \
  739. \set VSET ".vs | .set <variable> [definition]"
  740. \comm VSET
  741. Set variable  defines a variable to be later used in the document.
  742. If the definition part is left out, PROFF uses the variable name as a prompt
  743. and allows the user to define the variable interactively. Variable names cannot
  744. start with a numeric character, and may only contain alphanumeric 
  745. characters. The definition of a variable may not contain any blanks, unless
  746. they are surrounded by double-quotes. To get a double quote within a a quoted 
  747. definition, two double-quotes are used.
  748.  Once the variable is
  749. defined, it can be used anywhere in the document, including the command
  750. line itself. A variable substitution is invoked by a dollar sign (_$). (A 
  751. literal _$ is inserted into text using ___$).
  752. A variable name must be delimited by a non-alphanumeric character within the 
  753. text. If the contents of the variable is to be appended to other 
  754. alphanumeric characters, it must be surrounded by wiggly braces 
  755. ("{" and "}"). The following is an example of variable usage:
  756. \need 12
  757. \sp
  758. \nf
  759. |.nf
  760. |.vs v1 Murphy
  761. |_${v1}'s first law:
  762. |    Nothing is as easy as it looks.
  763. |_${v1}'s second law:
  764. |    Everything takes longer than you think.
  765. |Charley's observation:
  766. |    Computers were invented by _$v1.
  767. |
  768. \sp
  769. Produces the following:
  770. \sp
  771. \need 8
  772. |
  773. |Murphy's first law:
  774. |    Nothing is as easy as it looks.
  775. |Murphy's second law:
  776. |    Everything takes longer than you think.
  777. |Charley's observation:
  778. |    Computers were invented by Murphy.
  779. |
  780. \sp
  781. \fi
  782. \set VGET ".vg | .get <variable> <prompt>"
  783. \comm VGET
  784. Get variable is the interactive version of variable definition. In this 
  785. variant, a prompt string is used to obtain the value of the variable,
  786. which is typed at the user's terminal. If the prompt string is to 
  787. contain blanks, tabs etc., it must be enclosed in double quotes. No quotes
  788. are necessary for input text.
  789. \set VRG ".nr <a-z> [+|-][n]"
  790. \comm VRG
  791. Number register is used to define registers that contain numeric values.
  792. There are 26 number registers, named a-z. The command ".nr x n" sets the
  793. number register "x" to value n; ".nr x +n" increments the number register
  794. by n; ".nr x -n" decrements the number register by n. The value of the
  795. number register x is placed in the text by the appearance of _@nx. A literal
  796. _@ may be inserted using ___@.
  797. Number registers may be used on command lines and anywhere in the text.
  798. \set CCHAR ".cc | .cchar [char]"
  799. \comm CCHAR
  800. Control Character  sets the character that distinguishes PROFF 
  801. commands from text to be formatted. As a default, control character is set to 
  802. (".") period.
  803. This character may be changed to something other than a period, either
  804. to mimic other formatters or to disallow interpretation of lines beginning
  805. with a period. (This document makes heavy use of the .cc command).
  806. \set ECHAR ".ec | .echar [char]"
  807. \comm ECHAR
  808. Escape Character  sets the character that disallows the 
  809. interpretation of spacial characters such as _@ and _$. PROFF uses an
  810. underline ("__") character as a default.
  811. \set SOU ".so | .source | .include | .require [filename]"
  812. \comm SOU
  813. The source (include) command allows external files to be inserted into the 
  814. input file
  815. during the formatting. Using this feature, tables, graphs and other 
  816. documents generated outside PROFF may be included into the document
  817. being formatted. This feature is also very useful in including a common set
  818. of macros during formatting. Include files may be nested inside other
  819. include files. Currently, PROFF only allows a nested include
  820. files level of 8. Filename may be enclosed in quotes.
  821. \set SAVE ".sv | .save"
  822. \comm SAVE
  823. The save command allows the saving of the current formatter context on a 
  824. pushdown stack. The saved context of the formatter segment (FSECT) includes
  825. the following values and flags:
  826. \need 14
  827. \sp
  828. \nf
  829. \nap
  830. values            flags        on   |  off
  831. ------            -----        
  832. indent         (.in)    fill        (.fi | .nf)
  833. right margin    (.rm)    justify     (.ju | .nj)
  834. offset        (.po)    paging      (.pa | .np)
  835. line spacing    (.ls)    number type       (.pn)
  836. page length    (.pl)    bolding        (.eb | .db)
  837. margin values    (.m1)    autoparagraph    (.ap | .na)
  838.         (.m2)
  839.         (.m3)
  840.         (.m4)
  841. control char    (.cc)
  842. escape char    (.ec)
  843. \sp
  844. \ap
  845. \fi
  846. \set RST ".rs | .restore"
  847. \comm RST
  848. The restore command pops the context stack and restores the values and flags
  849. as defined above.
  850. \set LEX ".lx | .lex <command> [equate]"
  851. \comm LEX
  852. The lexical modification command is essentially a permanent replacement of a
  853. given command. This command is used for changing the command names without
  854. resorting to the macro facility. Lex permanently removes the old
  855. command name from command tables and replaces it with the new definition.
  856. If the equate is not specified, the command  becomes undefined and is
  857. no longer recognised by PROFF. The command equate should not contain 
  858. non-alphanumeric characters.
  859. \set APR ".ap | .autoparagraph"
  860. \comm APR
  861. The autoparagraph command turns on the automatic paragraphing feature. If
  862. auto-paragraphing is on, every line that starts with a 
  863. \ul
  864. blank
  865. or a 
  866. \ul
  867. tab
  868. character starts a new paragraph. A new line is generated (.sp) and
  869. the beginning of the paragraph is indented by five spaces.
  870. Autoparagraphing is the equivalent of the following commands:
  871. \in +5
  872. \nf
  873. |
  874. |textextextextext
  875. |.sp
  876. |.ti +5
  877. |textextextextext
  878. |
  879. \in -5
  880. \fi
  881. \set NAP ".na | nap | .noautoparagraph"
  882. \comm NAP
  883. No Autoparagraph command disables auto-paragraphing.
  884. \set WRT ".wr | .write <string>"
  885. \comm WRT
  886. Write is a special output command, only to be used to configure printers
  887. and other output devices with escape sequences. This command outputs the
  888. associated string as it is encountered, without going through the normal
  889. output routines of the formatter. Currently, the output string may contain
  890. control characters specified as "^<char>", decimal numbers within the range
  891. of 1-255, and other characters. Blanks within the string are skipped. Any
  892. portion of the string enclosed with double quotes is output as is. To output
  893. a double quote, two double quotes must be used within the quoted string.
  894. Following is a typical string to set a Digital La-100 printer to letter
  895. quality print mode:
  896. \sp
  897. \nf
  898. \in +5
  899. |
  900. |.wr ^["[2z"
  901. |
  902. \sp
  903. \fi
  904. \in -5
  905. In the control string, "^[" is the ASCII equivalent of the Escape (esc) character.
  906. Following mapping table is used to convert characters starting with a caret
  907. to their binary equivalents: ("|" indicates an alternative)
  908. \nf
  909. \nap
  910. \sp
  911. \in +5
  912. Control chr    Dec.    Oct.    Hex.
  913. -----------    ----    ----    ----
  914. ^a | ^A    (soh)    1    01      01
  915. ^b | ^B    (stx)    2    02    02
  916. ^c | ^C    (etx)    3    03    03
  917. ^d | ^D    (eot)    4    04    04
  918. ^e | ^E    (enq)    5    05    05
  919. ^f | ^F    (ack)    6    06    06
  920. ^g | ^G    (bel)    7    07    07
  921. ^h | ^H    (bs)    8    10    08
  922. ^i | ^I    (ht)    9    11    09
  923. ^j | ^J    (nl)    10    12    0A
  924. ^k | ^K    (vt)    11    13    0B
  925. ^l | ^L    (np)    12    14    0C
  926. ^m | ^M    (cr)    13    15    0D
  927. ^n | ^N    (so)    14    16    0E
  928. ^o | ^O    (si)    15    17    0F
  929. ^p | ^P    (dle)    16    20    10
  930. ^q | ^Q    (dc1)    17    21    11
  931. ^r | ^R    (dc2)    18    22    12
  932. ^s | ^S    (dc3)    19    23    13
  933. ^t | ^T    (dc4)    20    24    14
  934. ^u | ^U    (nak)    21    25    15
  935. ^v | ^V    (syn)    22    26    16
  936. ^w | ^W    (etb)    23    27    17
  937. ^x | ^X    (can)    24    30    18
  938. ^y | ^Y    (em)    25    31    19
  939. ^z | ^Z    (sub)    26    32    1A
  940. ^[    (esc)    27    33    1B
  941. ^\    (fs)    28    34    1C
  942. ^]    (gs)    29    35    1D
  943. ^^    (rs)    30    36    1E
  944. ^__    (us)    31    37    1F
  945. \sp
  946. \in -5
  947. \ap
  948. \fi
  949. \cchar .
  950. .in -5
  951. .bp
  952. .cl
  953. .sect 1 3.7 Defining New Commands (Macros)
  954.  In document formatting, it is common to repeat a series of commands at
  955. several places in the document. PROFF allows you to define a new command
  956. that will replace these repeated commands. This not only saves typing but
  957. ensures that
  958. .ul
  959. exactly
  960. the same sequence of commands are applied throughout the document. A new
  961. command that you define is formally called a
  962. .ul
  963. macro.
  964. To define a macro, you must use the define macro (.de | .define) and
  965. end macro (.en) commands.
  966. .in +5
  967. .cchar \
  968. \set DEF ".de | .define <macro name>"
  969. \comm DEF
  970. Define is used to define a <macro name> to which a series of commands to
  971. be assigned. This definition line is followed by any number of PROFF
  972. commands and/or text which define the action that the macro
  973. will subsequently produce. Macros may refer to other macros.
  974. \set ENM ".en"
  975. \comm ENM
  976. End macro is the last line in the command definition. You must put in this
  977. command to finish a currently defined macro. ".en" command should not be
  978. re-defined as a macro.
  979. \in -5
  980. \sp
  981. The example below defines macros ".note" and ".endnote", similar to the
  982. RUNOFF commands of the same name.
  983. \in +5
  984. \nap
  985. \nf
  986. \need 20
  987. \sp
  988. |
  989. |.define note
  990. |.sp
  991. |.ce
  992. |NOTE
  993. |.sp
  994. |.fi
  995. |.in +5
  996. |.rm -5
  997. |.en
  998. |
  999. |.define endnote
  1000. |.sp
  1001. |.nf
  1002. |.in -5
  1003. |.rm +5
  1004. |.en
  1005. |
  1006. \in -5
  1007. \ap
  1008. \fi
  1009.  A macro is used like any other PROFF command, control character followed
  1010. immediately  by the name of the macro. For example, the above macros
  1011. may be used as follows:
  1012. \in +5
  1013. \nap
  1014. \need 9
  1015. \nf
  1016. \sp
  1017. |
  1018. |.note
  1019. |textextextextextextextextextext
  1020. |              .
  1021. |           .
  1022. |           .
  1023. |.endnote
  1024. |
  1025. \in -5
  1026. \sp
  1027. \fi
  1028. The following note is generated by the same macros described previously.
  1029. \cc .
  1030. .nap
  1031. .note
  1032. Flap's Law: Any inanimate object, regardless of its position or configuration,
  1033. may be expected to perform at any time in a totally unexpected manner for
  1034. reasons that are either entirely obscure or else completely mysterious.
  1035. .endnote
  1036. .fi
  1037. .cc \
  1038. \ap
  1039. Special symbols may be used within a macro definition. These symbols represent
  1040. the parameters passed to a macro, delimited by blanks or commas.
  1041. These symbols are _$0 for macro name, _$1 for the first parameter, _$2 for
  1042. the second parameter and so on, up to _$9 for the ninth parameter. Currently,
  1043. macro parameters may only contain alphanumerics, no string parameters are
  1044. possible. The previous macro "note" may now be defined as follows:
  1045. \in +5
  1046. \nap
  1047. \nf
  1048. \need 20
  1049. \sp
  1050. |
  1051. |.define note
  1052. |.sp
  1053. |.ce
  1054. |_$2 _$3 _$4 _$5 _$6 _$7 _$8 _$9
  1055. |.nr m _$1
  1056. |.sp
  1057. |.fi
  1058. |.in +_$1
  1059. |.rm -_$1
  1060. |.en
  1061. |
  1062. |.define endnote
  1063. |.sp
  1064. |.nf
  1065. |.in -_@nm
  1066. |.rm +_@nm
  1067. |.en
  1068. |
  1069. \in -5
  1070. \ap
  1071. \fi
  1072.  In this version of the "note" and "endnote" macros, the first parameter (_$1)
  1073. is used to pass the value for indentation and right margin adjustment.
  1074. All the rest of the macro parameters (_$2 - _$9) are used as the title of
  1075. the note. The indent value passed as the first parameter is also saved in the
  1076. number register "m" to communicate it to the "endnote" macro, such that
  1077. when the endnote macro is called, both indent and right margin values are
  1078. adjusted back to normal. It is possible and may be more useful to use
  1079. ".save" and ".restore" commands to accomplish the same task, especially if
  1080. the macro alters the current formatting context drastically. The ".note"
  1081. and ".endnote" macros may be called as follows:
  1082. \in +5
  1083. \nap
  1084. \need 9
  1085. \nf
  1086. \sp
  1087. |
  1088. |.note 5 Asimov's Law of Robotics
  1089. |textextextextextextextextextext
  1090. |              .
  1091. |           .
  1092. |           .
  1093. |.endnote
  1094. |
  1095. \in -5
  1096. \fi
  1097. \ap
  1098.  In this usage, the indent value will be adjusted by +5, right margin will
  1099. be adjusted by -5, and the title "Asimov's Law of Robotics" will appear
  1100. centered above the note.
  1101. \cchar .
  1102. .bp
  1103. .cl
  1104. .sect 0 4.0 Executing PROFF
  1105.  The PROFF program  may be invoked with a series of optional parameters and
  1106. filenames on the command line. The command synopsis is:
  1107.  
  1108. PROFF [+n] [-n] [-v] [-s] [-pon] [-ifile] input [output]
  1109.  
  1110. The square brackets indicate an optional parameter. Interpretation of the
  1111. parameters is as follows:
  1112. .nap
  1113. .in +10
  1114. .define opt
  1115. .need 5
  1116. .sp
  1117. .ti -5
  1118. .bd
  1119. $1
  1120. .br
  1121. .en
  1122. .opt +n
  1123. Start the printing of the document at the first page with
  1124. number n.
  1125. .opt -n
  1126. Stop printing at the first page numbered higher than n.
  1127. .opt -v
  1128. Verbose mode. PROFF indicates the source files being included into
  1129. document, and produces a summary of the number of textlines read in, the number
  1130. of lines and actual pages generated. A memory usage summary of internal
  1131. storage for macros, stacks and tables is also displayed.
  1132. .opt -s
  1133. Stop before each page, including the first one to allow paper
  1134. adjustment. A prompt is given just before the first page. For each
  1135. page thereafter, the terminal bell is rung to indicate that another sheet
  1136. of paper is needed.
  1137. .opt -pon
  1138. Sets the page offset to n. This is equivalent to ".po" command within
  1139. the document. It is recommended that -pon option be used instead of
  1140. embedding the offset value within the document.
  1141. .opt -ifile
  1142. Includes the given file to the formatted document. This is equivalent to
  1143. a ".include file" command within the document. This option may be
  1144. repeated more than once, -ifile1 -ifile2 etc. 
  1145. .opt input
  1146. Specifies the input file to be formatted. PROFF does not impose any
  1147. file extension. The recommended extension is ".PRF".
  1148. .opt output
  1149. Specifies the output file for the formatted document. If this is omitted,
  1150. output is directed to the user's terminal.
  1151. .in -10
  1152.  
  1153. Following are some examples of PROFF command lines:
  1154.  
  1155. .ti +5
  1156. A>PROFF -v proffman.prf
  1157.  
  1158. Format this document (proffman.prf) in verbose mode, and output the
  1159. formatted document to the
  1160. terminal.
  1161.  
  1162. .ti +5
  1163. A>PROFF +5 -imacros.pma proffman.prf
  1164.  
  1165. Format this document, include the external file MACROS.PMA, skip the first
  1166. four pages and output the formatted document to the terminal.
  1167.  
  1168. .ti +5
  1169. A>PROFF -po10 proffman.prf proff.man
  1170.  
  1171. Format this document, shift the entire document by 10 spaces to right and
  1172. output to a file called proff.man.
  1173. .bp
  1174. .cl
  1175. .sect 0 5.0 Tips on using PROFF
  1176. .ap
  1177. .sect 1 5.1 Care and Feeding of Memory
  1178.  PROFF uses a dynamic memory allocation scheme for some of its operations.
  1179. These are macro definitions, contents lines, variables and save context 
  1180. operation.
  1181. Running PROFF under microcomputers with limited memory resources (64k or less)
  1182. require some care in using these commands:
  1183. .list 3
  1184. .item a)
  1185. Do not declare macros that are not needed within the document.
  1186. .item b)
  1187. Do not use comments within macros. Due to delayed evaluation, comments
  1188. will also be stored as a part of the macro definition.
  1189. .item c)
  1190. Where possible, avoid using too much text within macros. It is just as
  1191. easy to pass the information during the macro call.
  1192. .item d)
  1193. Use only the shortest form of commands within macros.
  1194. .item e)
  1195. Be brief in contents line text.
  1196. .item f)
  1197. Use short variable names as long as it is not so cryptic as to be confusing.
  1198. .item g)
  1199. Avoid unnecessary blanks within the variable definitions.
  1200. .item h)
  1201. Avoid too many context saves without a corresponding restore. The restore
  1202. operation reclaims the memory used for a save.
  1203. .nolist
  1204.  Even if the formatter is used with a system of large memory resources,
  1205. some of the precautions above are applicable. (Utz's 4th law of Computer
  1206. Programming: Any given program will eventually expand to fill all the
  1207. available memory.) Using the -v option under memory-restricted systems
  1208. may be useful in determining the memory usage.
  1209.  
  1210. .sect 1 5.2 Formatting without fuss
  1211.  PROFF, using its default settings, may provide reasonably formatted output
  1212. in many situations.
  1213. As an example, examine the document PROFF.TUT. This document does not use
  1214. ANY formatting commands. All formatting is done with the default settings.
  1215.  
  1216. .sect 1 5.3 Variables within macros
  1217.  Variable expansions may be performed within the macros. Typically, one
  1218. of the parameters of the macro is assumed to be a variable, which is expanded
  1219. only after the macro is used. Thus:
  1220. .in +5
  1221. .nf
  1222.  
  1223. |
  1224. |.define xx
  1225. |.ce
  1226. |_$_$1
  1227. |.cl _$_$1
  1228. |.en
  1229. |
  1230.  
  1231. .in -5
  1232. .fi
  1233. The macro xx assumes the first parameter to be a variable, which is
  1234. centered on the page, and also entered in the table of contents.
  1235. Note the usage of "_$_$1". The lines within a macro are scanned from
  1236. right to left for parameter expansion. Thus, "_$1" is expanded first,
  1237. resulting in "_$<first parameter>". This is later expanded as a variable.
  1238.  
  1239. .bp
  1240. .cl
  1241. .sect 0 6.0 Example macros
  1242.  
  1243. .nf
  1244. .in +5
  1245. .cc \
  1246. .!
  1247. .! macros to create a point-form lists.
  1248. .! note the use of number registers within
  1249. .! the macros.
  1250. .!------------
  1251. .define list
  1252. .nr a _$1    
  1253. .in _$1
  1254. .en
  1255. .!------------
  1256. .define item
  1257. .sp
  1258. .ti -_@na
  1259. _$1
  1260. .en
  1261. .!------------
  1262. .define nolist
  1263. .in -_@na
  1264. .sp
  1265. .en
  1266. .!------------
  1267.  
  1268. \in -5
  1269. \fi
  1270. The "list" macro is used to generate point-form lists. The first parameter
  1271. is an indent value, size of point-str + 1. A typical usage may be as 
  1272. follows:
  1273. \need 16
  1274. \in +5
  1275.  
  1276. \nf
  1277. |
  1278. |Project work involves:
  1279. |.sp
  1280. |.list 3        { size-of-point-str + 1 }
  1281. |.item a)        { "a)" is the point-str }
  1282. |choosing a topic
  1283. |.item b)
  1284. |defining the topic
  1285. |.item c)
  1286. |research
  1287. |.item d)
  1288. |organizing the notes
  1289. |{etc.}
  1290. |.nolist        { readjusts the indent  }
  1291. |
  1292. \in -5
  1293.  
  1294. The above usage will produce the following:
  1295. \need 12
  1296. \in +5
  1297.  
  1298. |
  1299. |Project work involves:
  1300. |
  1301. |a) choosing a topic
  1302. |
  1303. |b) defining the topic
  1304. |
  1305. |c) research
  1306. |
  1307. |d) organizing the notes
  1308. |
  1309.  
  1310. \in -5
  1311. \fi
  1312. The point-form recommendations under section 5.1 (Care and Feeding of 
  1313. Memory) were generated with the same set of macros described above.
  1314. \cc .
  1315. .bp
  1316. .cl
  1317. .sect 0 7.0 Acknowledgements
  1318.  This document was edited by Terry Lim and Steven Tress.
  1319. The format of the document is largely based on The Freshwater Institute
  1320. RUNOFF User's Guide. The Quotes for the various formatting examples are
  1321. from THE QUOTABLE NOTHING BOOK and from 1001 LOGICAL LAWS, ACCURATE
  1322. AXIOMS, PROFOUND PRINCIPLES, TRUSTY TRUISMS, HOMEY HOMILIES, COLORFUL
  1323. COROLLARIES, QUOTABLE QUOTES, AND RAMBUNCTIOUS RUMINATIONS FOR ALL
  1324. WALKS OF LIFE, by Peers, Bennet and Booth, Fawcett Columbine Books,
  1325. New York.
  1326. .bp
  1327. .cl
  1328. .sect 0 Appendix A
  1329. .he /1.0/Appendix A/#/
  1330. .cc \
  1331. \nf
  1332. \nap
  1333. \ce
  1334. Summary of Commands
  1335.  
  1336. ----------------------------------------------------------
  1337. $FILL
  1338.         default:    initial: yes    break: yes
  1339.         begin filling output lines
  1340. ----------------------------------------------------------
  1341. $NOFILL
  1342.         default:    initial: no    break: yes
  1343.         stop filling
  1344. ----------------------------------------------------------
  1345. $JUST
  1346.         default:    initial: yes    break: yes
  1347.         begin justifying filled lines
  1348. ----------------------------------------------------------
  1349. $NOJUST
  1350.         default:    initial: no    break: yes
  1351.         stop justifying
  1352. ----------------------------------------------------------
  1353. $BREAK
  1354.         default:    initial:    break: yes
  1355.         cause a break and output current line
  1356. ----------------------------------------------------------
  1357. $INDENT
  1358.         default: 0    inital: 0    break: yes
  1359.         set left margin to column n+1
  1360. ----------------------------------------------------------
  1361. $TINDENT
  1362.         default: 0    initial:    break: yes
  1363.         temporarily indent next output n spaces
  1364. ----------------------------------------------------------
  1365. $SPACETO
  1366.         default: 0     initial:    break: yes
  1367.         space to line +n from top
  1368.         space to line -n from bottom
  1369. ----------------------------------------------------------
  1370. $SPACE
  1371.         default: 1     initial:    break: yes
  1372.         space n lines except at top of page
  1373. ----------------------------------------------------------
  1374. $CENTER
  1375.         default: 1    initial        break: yes
  1376.         center next n lines
  1377.         center until turned off
  1378. ----------------------------------------------------------
  1379. $UNDLINE
  1380.         default: 1    initial        break: no
  1381.         underline next n lines
  1382.         underline until turned off
  1383. ----------------------------------------------------------
  1384. \bp
  1385. ----------------------------------------------------------
  1386. $CUNDLINE
  1387.         default: words    initial: words    break: no
  1388.         set mode for underline - words or all
  1389. ----------------------------------------------------------
  1390. $BOLD
  1391.         default: 1    initial:    break: no
  1392.         boldface (overstrike) next n lines
  1393.         boldface until turned off
  1394. ----------------------------------------------------------
  1395. $DBO
  1396.         default:    initial: no    break: no
  1397.         disable bolding
  1398. ----------------------------------------------------------
  1399. $EBO
  1400.         default:    initial: yes    break: no
  1401.         enable bolding
  1402. ----------------------------------------------------------
  1403. $LS
  1404.         default: 1    initial: 1    break: no
  1405.         set line spacing to n
  1406. ----------------------------------------------------------
  1407. $BP
  1408.         default: +1    initial: 1    break: yes
  1409.         begin a new page and number it n
  1410. ----------------------------------------------------------
  1411. $PN
  1412.         default:    initial: arabic    break: no
  1413.         set page numbering to arabic or roman
  1414. ----------------------------------------------------------
  1415. $NPA
  1416.         default:    initial: no    break: yes
  1417.         disable paging
  1418. ----------------------------------------------------------
  1419. $PA
  1420.         default:    initial: yes    break: yes
  1421.         enable paging
  1422. ----------------------------------------------------------
  1423. $NE
  1424.         default: 0    initial:    break: yes/no
  1425.         need n lines. Break and generate a new page
  1426.         if not available
  1427. ----------------------------------------------------------
  1428. $HE
  1429.         default: null    initial: null    break: no
  1430.         set header to text (/left/center/right/)
  1431. ----------------------------------------------------------
  1432. $FO
  1433.         default: null    initial: null    break: no
  1434.         set footer to text (/lef/center/right/)
  1435. ----------------------------------------------------------
  1436. \bp
  1437. ----------------------------------------------------------
  1438. $OHE
  1439.         default: null    initial: null    break: no
  1440.         set header on odd pages to text
  1441. ----------------------------------------------------------
  1442. $EHE
  1443.         default: null    initial: null    break: no
  1444.         set header on even pages to text
  1445. ----------------------------------------------------------
  1446. $OFO
  1447.         default: null    initial: null    break: no
  1448.         set footer on odd pages to text
  1449. ----------------------------------------------------------
  1450. $EFO
  1451.         default: null    initial: null    break: no
  1452.         set footer on odd pages to text
  1453. ----------------------------------------------------------
  1454. $PO
  1455.         default: 0    initial: 0    break: yes
  1456.         set page offset to n spaces
  1457. ----------------------------------------------------------
  1458. $RM 
  1459.         default: 65    initial: 65    break: no
  1460.         set right margin to column n
  1461. ----------------------------------------------------------
  1462. $PL
  1463.         default: 66    initial: 66    break: no
  1464.         set page length to n lines
  1465. ----------------------------------------------------------
  1466. $M1
  1467.         default: 3    initial: 3    break: no
  1468.         lines between top of page and header
  1469. ----------------------------------------------------------
  1470. $M2
  1471.         default: 2    initial: 2    break: no
  1472.         lines between header and text
  1473. ----------------------------------------------------------
  1474. $M3
  1475.         default: 2     initial: 2    break: no
  1476.         lines between text and footer
  1477. ----------------------------------------------------------
  1478. $M4
  1479.         default: 3    initial: 3    break: no
  1480.         lines between footer and bottom
  1481. ----------------------------------------------------------
  1482. $CL
  1483.         default:    initial:    break: yes
  1484.         enter text into table of contents at level
  1485.         n
  1486. ----------------------------------------------------------
  1487. \bp
  1488. ----------------------------------------------------------
  1489. $PC
  1490.         default: 3    initial: 3    break: yes
  1491.         print table of contents, indent each level
  1492.         n spaces
  1493. ----------------------------------------------------------
  1494. $VSET
  1495.         default:    initial:    break: no
  1496.         set variable to text
  1497. ----------------------------------------------------------
  1498. $VGET
  1499.         default:    initial:    break: no
  1500.         set variable interactively, using text
  1501.         as prompt
  1502. ----------------------------------------------------------
  1503. $VRG
  1504.         default: 0    initial: 0    break: no
  1505.         set number register (a-z) to n
  1506. ----------------------------------------------------------
  1507. $CCHAR
  1508.         default: "."    initial: "."    break: no
  1509.         set command control character to char
  1510. ----------------------------------------------------------
  1511. $ECHAR
  1512.         default: "__"    initial: "__"    break: no
  1513.         set universal escape character to char
  1514. ----------------------------------------------------------
  1515. $SOU
  1516.         default:     initial: input    break: no
  1517.         switch input to file
  1518. ----------------------------------------------------------
  1519. $SAVE
  1520.         default:    initial:    break: yes
  1521.         save the current formatter context on 
  1522.         context stack
  1523. ----------------------------------------------------------
  1524. $RST
  1525.         default:    initial:    break: yes
  1526.         restore the formatter context from context
  1527.         stack
  1528. ----------------------------------------------------------
  1529. $LEX
  1530.         default:    initial:    break: no
  1531.         rename a command
  1532. ----------------------------------------------------------
  1533. $APR
  1534.         default:    initial: no    break: no
  1535.         enable auto-paragraphing
  1536. ----------------------------------------------------------
  1537. \bp
  1538. ----------------------------------------------------------
  1539. $NAP
  1540.         default:    initial: yes    break: no
  1541.         disable auto-paragraphing
  1542. ----------------------------------------------------------
  1543. $WRT
  1544.         default:    initial:    break: no
  1545.         write a special string to output. line
  1546.         counter does not change
  1547. ----------------------------------------------------------
  1548. $DEF
  1549.         default:    initial:    break: no
  1550.         define a macro command - ends at ".en"
  1551. ----------------------------------------------------------
  1552. $ENM
  1553.         default:    initial:    break: no
  1554.         end the macro definition
  1555. ----------------------------------------------------------
  1556. \cc .
  1557. .bp 1
  1558. .pn roman
  1559. .he ////
  1560. .fo //- # -//
  1561. .ce on
  1562. Table Of Contents
  1563.  
  1564. PROFF 1.0
  1565. .ce off
  1566. .pc
  1567.